<template>
  <view class="protol-page">
    <rich-text :nodes="nodes"></rich-text>
  </view>
</template>

<script>
  import { protol_type } from '@/utils/dict';
  const app = getApp();
  
  export default {
    data() {
      return {
        nodes: null
      };
    },
    onLoad(options) {
      const type = options.type;
      const target = protol_type.find(v => v.value === type);
      uni.setNavigationBarTitle({
        title: target.label
      });
      app.getSystem((res) => {
        this.nodes = res[target.prop];
      })
    }
  }
</script>

<style lang="scss">
.protol-page {
  background-color: #fff;
  padding: 32rpx 30rpx;
  text-align: justify;
  box-sizing: border-box;
}
</style>
